package com.itwh.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.itwh.project.common.DataGridView;
import com.itwh.project.domain.Department;
import com.itwh.project.mapper.DepartmentMapper;
import com.itwh.project.service.DepartmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 部门 服务实现类
 * </p>
 *
 * @author 翁煌
 * @since 2020-07-05
 */
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {

    @Autowired
    DepartmentMapper departmentMapper;

    @Override
    public DataGridView loadAllDepartemntForSelect() {
        QueryWrapper<Department> queryWrapper=new QueryWrapper<>();
        List<Department> list = this.departmentMapper.selectList(queryWrapper);
        return new DataGridView("加载所有学院成功",list);
    }
}
